//
//  ZYHellp.h
//  Merchant
//
//  Created by apple on 16/3/29.
//  Copyright © 2016年 ibendi. All rights reserved.

//http://www.jianshu.com/p/88503821f4ab 如何使用oschina托管项目
//http://jingyan.baidu.com/article/f7ff0bfc12b52e2e27bb134c.html

//http://blog.csdn.net/u014600626/article/details/53006110 mac 教程









//s.subspec 'ZYLocation' do |es|
//es.source_files = 'ZYLibs/Classes/ZYLocation/**/*'
//es.public_header_files = 'ZYLibs/Classes/ZYLocation/**/*.h'
//end
//
//s.subspec 'ZYCustemView' do |fs|
//fs.source_files = 'ZYLibs/Classes/ZYCustemView/**/*'
//fs.public_header_files = 'ZYLibs/Classes/ZYCustemView/**/*.h'
//end

#import <Foundation/Foundation.h>




@interface ZYHellp : NSObject
@property (nonatomic, strong) NSString *filePassword;

+ (instancetype)sharedManager;
/**
 *  删除所有
 */
+ (void) resetCache;

/**
 *  根据关键字删除
 *
 *  @param key 关键字
 */
+(void)resetCacheForKey:(NSString *)key;

+ (NSString*) cacheDirectory;


/**
 获取所有文件
 @return <#return value description#>
 */
+ (NSArray *)getAllFloder;

+ (void) setData:(NSData*)data forKey:(NSString*)key;
+ (NSData *) dataForKey:(NSString*)key;

///   存储 自定义类需要实现归档协议
+ (void)setObject:(id)Object forKey:(NSString*)key;
+ (id) objectForKey:(NSString*)key;

/// id 转data
+ (NSData *) convertByToData:(id)any;

///data类型 转换 id 类型
+ (id) convertByToIdObject:(NSData *)data;

/**
 *  获取存储文件的的时间
 */
+ (NSDate *)getWriteDateFor:(NSString *)key;

// 计算两个时间 相差多少分钟
- (int)intervalSinceWithOldTime:(NSString *)dateString withNewFormate:(NSString *) formate;

- (NSString *)getNewData;

+ (NSString *)deviceIPAdress;



@end
